package fr.inserm.umr915.vcfserver.io;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;

import net.sf.samtools.util.BlockCompressedInputStream;

import org.springframework.core.io.InputStreamSource;

public class BlockCompressedInputStreamSource implements InputStreamSource {
	String uri;
	public BlockCompressedInputStreamSource(String uri)
		{
		this.uri=uri;
		}
	@Override
	public InputStream getInputStream() throws IOException
		{
		URL url=new URL(uri);
	    return new BlockCompressedInputStream(url.openStream());
		}
	}
